/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.cip.esymons.eventos.bc;

import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import org.cip.esymons.eventos.be.NumeraContratos;

/**
 *
 * @author oscar
 */
@Stateless
public class NumeraContratosFacade implements NumeraContratosFacadeLocal {

    @PersistenceContext
    private EntityManager em;

    public void create(NumeraContratos numeracion) {
        em.persist(numeracion);
    }

    public void edit(NumeraContratos numeracion) {
        em.merge(numeracion);
    }

    public void remove(NumeraContratos numeracion) {
        em.remove(em.merge(numeracion));
    }

    public NumeraContratos find(Object id) {
        return em.find(NumeraContratos.class, id);
    }

    public List<NumeraContratos> findAll() {
        return em.createQuery("select object(o) from NumeraContratos as o").getResultList();
    }

}
